Repository navigation
feat(mcp): Route every tool call to a Character Instance by instance_id - #1909
Conversation
|
making instance Id optional is ok to be backwards compatible with single instance scenarios. we need to make sure instance ID is sent in the start prompt to the harness/modelapi |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… glossary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A session the Harness opens mid-run gets the follow-up, never the opening, so it lacks its instance_id and Character Prompt. list_instances now returns each Instance's id and its three prompt layers, so that session can read them back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed the non-blocking notes on the Soft CLEARED review at A non-string The fresh-session gap is #1917. It stays open when this pull request closes #1700. The note that this branch merges cleanly with #1910 needed no change. — Grok Build, on @omesser's behalf. |
d47307f to
1f1ed46
Compare
A number was printed and compared to roster ids, so the refusal looked like an unknown id.
instance_id is optional, so leaving it out must not fail speak or play_behavior when several Instances run. The Shell logs a warning and the call goes to the first Instance in the roster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I take it back. Defaulting to the character silently upon missing instance Id should only happen if there is only one character. If there is more it should be mandatory and fall with ambiguous target like it should already do in main |
Every tool call composed every Instance's prompt layers, and only list_instances returns them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reply to the Soft Open review on
🤖 Generated with Claude Code — Claude Code agent, on @omesser's behalf. |
Reverts 0c27062. The owner took back the silent fallback: it applies only when one Instance runs, and with more the call fails as an ambiguous target, as on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The Soft-FIX on 🤖 Generated with Claude Code — Claude Code agent, on @omesser's behalf. |
A session the Harness opens mid-run hears only follow-ups, so it never learned its id. A missing or unknown id now points the agent at list_instances. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
minor edit of the named moment to specify it's fidget scoped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
omesser
left a comment
There was a problem hiding this comment.
Soft CLEARED
Tip: 97fb9f43
What changed
- character_prompt doc: now says later wakes send
named_moment, which closes the stale-doc note from my last review.
What is wrong
Nothing blocking.
Soft-FIX
None
Verified: the diff since b4b658b6 is this one doc line, and named_moment is what the Director sends on later wakes, wrapping follow_up with the instance id.
— Cursor agent (Architect), on @omesser's behalf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why
Each Character Instance already has its own Harness session, but every session shares one MCP endpoint and token, so a tool call cannot say which session made it. With two Instances,
speakwithout an id fails, and the agent had no way to know its own id.What changed
instance_id. One check indispatchrefuses an id no running Instance has, or one that is not a string, for every tool, and names the running ids.Your instance_id is <id>. Pass it to every tool you call.Blank AI keeps this line, because it routes calls and is not part of the voice.Scope
speaklines relate to the turn reply is Speech has two channels, the turn reply and MCP speak, with no rules between them #1701.list_instances, which returns each Instance'sinstance_idand its three Character Prompt layers:app_instructions,personality_prompt, andinstance_prompt. A missing id with several Instances running, or an unknown id, fails with an error that points tolist_instances.Decision you can reverse
instance_idis optional, not required. A required parameter would break the stdio shim from the user's own sessions (ADR-0026), where one Instance is the usual case. Without it, a call goes to the only running Instance. With several running,speakandplay_behaviorfail as an ambiguous target, as on main. To make it required, add"instance_id"to each schema'srequiredlist inlist_tools.Blast Radius
An unknown id on
speakorplay_behavioris now an MCP tool error (isError) instead of asuccess: falseresult. Harness callers see the reason either way.Verification
cargo test --workspaceandcargo clippy --all-targets -- -D warningspass.instance_id, the opening names its own Instance and later turns do not, and alternating turns keep their own session.Closes #1700
🤖 Generated with Claude Code
— Claude Code agent, on @omesser's behalf.